package com.mengxuegu.springboot.mybatisplus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mengxuegu.springboot.mybatisplus.entities.Bill;
import com.mengxuegu.springboot.mybatisplus.mapper.BillMapper;
import com.mengxuegu.springboot.mybatisplus.service.IBillService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements IBillService {
    @Override
    public Bill getBillByBid(Integer bid) {
        return this.baseMapper.getBillByBid(bid);
    }

    @Override
    @Transactional()
    public int addBill(Bill bill) {
        int success = this.baseMapper.addBill(bill);
        int a = 1/0;
        return success;
    }
}
